import * as actionTypes from './constant';
import { getAirInfo } from '../../services';

const changeAirInfo = (res) => ({
    type:actionTypes.CHANGE_AIR_INFO,
    airInfo: res.data
})

export const getAirInfoAction = () => {
    return dispatch => {
        getAirInfo().then(res => {
            // console.log(res);
            dispatch(changeAirInfo(res));
        })
    }
}